import axios from 'axios';

export interface HttpResponse<T = unknown> {
    status: number;
    msg: string;
    code: number;
    data: T;
  }

export function saveFriendTask(data: any) {
  return axios.post<HttpResponse>('/api/saveFriendTask', data);
}

export function delFriendTask(data: any) {
  return axios.post<HttpResponse>('/api/delFriendTask', data);
}

export function getFriendTask(data: any) {
  return axios.post<HttpResponse>('/api/getFriendTask', data);
}

export function editFriendTask(data: any) {
  return axios.post<HttpResponse>('/api/editFriendTask', data);
}

export function resetFriendTask(data: any) {
  return axios.post<HttpResponse>('/api/resetFriendTask', data);
}

// 获取群成员列表
export function getMemberList(data: any) {
  return axios.post<HttpResponse>('/api/get/memberlist', data);
}

export function saveGroupFriendTask(data: any) {
  return axios.post<HttpResponse>('/api/saveGroupFriendTask', data);
}

export function delGroupFriendTask(data: any) {
  return axios.post<HttpResponse>('/api/delGroupFriendTask', data);
}

export function getGroupFriendTask(data: any) {
  return axios.post<HttpResponse>('/api/getGroupFriendTask', data);
}

export function editGroupFriendTask(data: any) {
  return axios.post<HttpResponse>('/api/editGroupFriendTask', data);
}

export function resetGroupFriendTask(data: any) {
  return axios.post<HttpResponse>('/api/resetGroupFriendTask', data);
}


export function createFriendSendTask(data: any) {
  return axios.post<HttpResponse>('/api/createFriendSendTask', data);
}

export function createGroupSendTask(data: any) {
  return axios.post<HttpResponse>('/api/createGroupSendTask', data);
}

export function getSendTask(data: any) {
  return axios.post<HttpResponse>('/api/getSendTask', data);
}

export function resetSendask(data: any) {
  return axios.post<HttpResponse>('/api/resetSendask', data);
}

export function deleteSentTasks(data: any) {
  return axios.post<HttpResponse>('/api/deleteSentTasks', data);
}

export function resetFailedTasks(data: any) {
  return axios.post<HttpResponse>('/api/resetFailedTasks', data);
}

export function clearAllTask(data: any) {
  return axios.post<HttpResponse>('/api/clearAllTask', data);
}



